package io.gitee.yxsnake.framework.resource.api;

import com.github.lianjiatech.retrofit.spring.boot.core.RetrofitClient;
import io.gitee.yxsnake.framework.core.domain.Result;
import io.gitee.yxsnake.framework.resource.api.domain.RemoteMessage;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * @author snake
 * @description 消息服务
 * @since 2024/11/3 13:51
 */
@RetrofitClient(baseUrl = "${retrofit.pisces-resource-server:http://pisces-resource-server:21002/}")
public interface RemoteMessageService {
    /**
     * 发布订阅的消息(群发)
     *
     * @param message 消息内容
     */
    @GET(value = "inner/message/publishAll")
    Result<Void> publishAll(@Query("message") String message);


    @POST(value = "inner/message/publishMessage")
    Result<Boolean> publishMessage(@Body RemoteMessage remoteMessage);
}
